home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Invisible Universe
/
Invisible Universe (1995)(Voyager)[Mac-PC].iso
/
mac
/
MOVIES
/
MUSIC.DIR
/
00001_Script_1
next >
Wrap
Text File
|
1995-11-16
|
4KB
|
138 lines
on startMovie
--set the keyDownScript to "checkKeyDowns"
initialize
pass
end startMovie
on keyDown
end
on exitFrame
go to the frame
end exitFrame
on enterFrame
end enterFrame
on stopMovie
go frame "FadeOut"
set the mouseDownScript to ""
unload
abort
pass
end stopMovie
on initialize
global gTheSongs, gMusicIsPlaying, gMusicCastNumber, gWhichSong, gLastMusicCastNumber
global gMusicDuration, gThePicts,gCurrentPictNum, gMusicLabel
global gQuittingMusic
set gQuittingMusic = 0
set the mouseDownScript to "QuitAndGoBack"
if voidP(gMusicLabel) then
put "COMETS" into gTheSongs
else
put gMusicLabel into gTheSongs
end if
set gThePicts to []
--put randomPicts() into gThePicts
put 0 into gWhichSong
put 0 into gLastMusicCastNumber
put 0 into gMusicCastNumber
put 0 into gMusicDuration
put 0 into gRandomGuy
put false into gMusicIsPlaying
put 1 into gCurrentPictNum
end initialize
on startMusic
global gTheSongs, gMusicIsPlaying, gMusicCastNumber,gWhichSong, gLastMusicCastNumber
global gMusicDuration, gLastPictSwitch
global gFixPalShared
if the machineType <> 256 then
if voidP(gFixPalShared) then setupFixPal
gFixPalShared(mPatchIt)
end if
put gMusicCastNumber into gLastMusicCastNumber
if gLastMusicCastNumber <> 0 then
--set the purgePriority of cast gLastMusicCastNumber to 2 --purge next
unloadcast gLastMusicCastNumber
end if
put gWhichSong+1 into gWhichSong
-- if gWhichSong > (the number of items in gTheSongs) then put 1 into gWhichSong
if not listP(gTheSongs) then set gTheSongs = list(gTheSongs)
if gWhichSong > (count(gTheSongs)) then put 1 into gWhichSong
put the number of cast (getAt(gTheSongs, gWhichSong) & ".MOV") into gMusicCastNumber
put ">>> " & gTheSongs
put ">>> playing " & getAt(gTheSongs, gWhichSong) && gWhichSong
puppetSprite 48,true
set the castNum of sprite 48 to gMusicCastNumber
--set the purgePriority of cast gMusicCastNumber to 0
put the duration of cast gMusicCastNumber into gMusicDuration
--set the directToStage of cast gMusicCastNumber to true
set the movieRate of sprite 48 to .01
-- go frame "start"
updateStage
startTimer
put 0 into gLastPictSwitch
set the movieRate of sprite 48 to 1
put true into gMusicIsPlaying
end startMusic
on QuitAndGoBack
global gMusicCastNumber, gQuittingMusic, gTheSongs
set gTheSongs = 0
set gQuittingMusic = 1
--set the purgePriority of cast gMusicCastNumber to 3
set v = the volume of sprite 48
repeat while v > 0
set v = v / 2
set the volume of sprite 48 = v
end repeat
--set the directToStage of cast gMusicCastNumber to false
set the movieRate of sprite 48 to 0
puppetSprite 48, 1
set the castNum of sprite 48 = 0
puppetSprite 48, 0
if the machineType = 256 then updateStage
-- go to "Black Frame"
-- go to the frame + 1
retrace 1
-- go movie "TOC"
end QuitAndGoBack
on randomPicts
return jumble(value(field "randomPicts"))
end randomPicts
on jumble oldList
set newList to []
set the randomSeed to integer(the last char of string(the ticks))
put count(oldList) into toChooseFrom
repeat while toChooseFrom
put random(toChooseFrom) into r
append newList, getAt(oldList,r)
deleteAt oldList,r
put count(oldList) into toChooseFrom
end repeat
return newList
end jumble